home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / akcc36.lha / Programmers / include / akcc_gen0 / akcc_gen0.h < prev   
C/C++ Source or Header  |  1995-08-08  |  4KB  |  123 lines

  1. /* akcc_gen0/akcc_gen0.h        */
  2. /* Version    : 37.3            */
  3. /* Date       : 25.07.1994        */
  4. /* Written by : Andreas R. Kleinert */
  5.  
  6.  
  7. #ifndef AKCC_GEN0_AKCC_GEN0_H
  8. #define AKCC_GEN0_AKCC_GEN0_H
  9.  
  10. #include <stdlib.h>
  11. #include <stdio.h>
  12. #include <string.h>
  13. #include <dos/dosextens.h>
  14. #include <exec/memory.h>
  15.  
  16. #include <dos.h> /* special SAS/C-Includes */
  17.  
  18. #include <proto/dos.h>
  19. #include <proto/exec.h>
  20.  
  21. #ifndef N
  22. #define N NULL     /* praktisch */
  23. #endif /* N */
  24.  
  25.  
  26. /* MACROs for BPTR-Handling */
  27.  
  28. #define TOBPTR(x) ( ((ULONG) x) >> 2)
  29. #define TOAPTR(x) ( ((ULONG) x) << 2)
  30.  
  31.  
  32. /* MACRO for Library Version-Test */
  33.  
  34. #define LibVer(x) ( ((struct Library *) x)->lib_Version )
  35.  
  36.  
  37. /* Codes returned by TestEntry() */
  38.  
  39. #define AKCC_TESTED_FILE      (1005L)
  40. #define AKCC_TESTED_DIR       (1006L)
  41. #define AKCC_TESTED_NOT_EXIST (AKCC_FALSE)
  42.  
  43.  
  44. /* AKCC-Errorcodes */
  45.  
  46. #define AKCC_FALSE (N)
  47. #define AKCC_TRUE  (TRUE)
  48.  
  49.  
  50. /* Remarks :
  51.  *                                         *
  52.  * 1200 chars are the maximum length for a text to be produced by         *
  53.  * AKCC_FPrintf().                                                           *
  54.  *                                         *
  55.  * (Subject to change ...)                                                   */
  56.  
  57. /* Test-Strings for "AKCC_WildCmp(orig, wild)" :                             *
  58.  *                                         *
  59.  * ABCDD     |       *D      -> TRUE                         *
  60.  * ABCDD     |      *DD      -> TRUE                         *
  61.  * ABCD      |      *DD      -> FALSE (!!!)                                     *
  62.  * ABCDD     |    A*C*D      -> TRUE                         *
  63.  * ABCDD     | A*C*D*      -> TRUE  (!!!)                                     *
  64.  * ABCDD     |     *CDD      -> TRUE                         *
  65.  * ABCDD     |    ?BCDD      -> TRUE                         *
  66.  * ABCDD     |     ?CDD      -> FALSE (!!!)                                     *
  67.  *                                         *
  68.  * Equivalents :                                 *
  69.  *                                         *
  70.  *  1. A? and AB? are both "equal" to AB (result : TRUE)                     *
  71.  *  2. A* and AB* are both "equal" to AB (result : TRUE)                     *
  72.  *                                         *
  73.  *  So "?" stands for "ONE or NO" chars                                      *
  74.  *  and "*" stands "UNLIMITED or NO" chars !!!                               *
  75.  *                                         *
  76.  * (Subject to more improvements ...)                                        */
  77.  
  78. struct DateStruct /* returned by "AKCC_GetDate(dos_rawdate)" */
  79. {
  80.  long ads_sec;
  81.  long ads_min;
  82.  long ads_hour;
  83.  long ads_day;
  84.  long ads_month;
  85.  long ads_year;
  86. };
  87.  
  88. struct PathList   /* This one is perhaps missing in the Dos-Includes */
  89. {
  90.  BPTR pl_Next; /* Next entry, if not zero. */
  91.  BPTR pl_Lock; /* The Lock itself.       */
  92. };
  93.  
  94.  /* Note : The PathList structure is allocated via AllocMem() under
  95.        OS V33-V35, but under OS V37+ AllocVec() is used for this.
  96.        Delocation has to be done via FreeVec() under V37+.
  97.        The behaviour of the Beta-OS V36 is supposed to be the same
  98.        as V33-V35. This is a possible bug-source !!!
  99.  */
  100.  
  101.  
  102. /* 'Parsing'-Codes for "AKCC_ParseText(orig, new)" :                         *
  103.  *                                         *
  104.  * Textstyles and their Codes :                          *
  105.  *                \N    : Normal                 *
  106.  *                \B    : Bold                     *
  107.  *                \I    : Italics                 *
  108.  *                \U    : Underlined                 *
  109.  *                \R    : Reverse                 *
  110.  * Colors              :                          *
  111.  *                \C=<FG>,<BG>                     *
  112.  * Characters              :                          *
  113.  *                \\                         *
  114.  *                \42    : "                                  *
  115.  * 'Formatters' and their Codes :                                            *
  116.  *                \n    : linefeed                 *
  117.  *                \b    : backspace                 *
  118.  *                \f    : clrscr                 *
  119.  *                \t    : TAB                     *
  120.  *                \r    : carriage return             */
  121.  
  122. #endif /* AKCC_GEN0_AKCC_GEN0_H */
  123.